<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>
<head>
<script type="text/javascript" src="${staticPath}/js/decimalinput.js"></script>
<link rel="stylesheet" href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script src="${staticPath}/js/jquery-dialog.js" type="text/javascript"></script>
<script src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js" type="text/javascript"></script>
<script src="${staticPath}/js/jQuery.FillOptions.js"></script>
<script type="text/javascript" src="${staticPath}/js/contract_list.js"></script>
<script type="text/javascript">
var storeId1='${associatedContract.storeId}';
var floorId1 ='${associatedContract.floorId}';
var  formart ="";

</script>
<meta name="decorator" content="moduleList" /></head>
<body>
	<form:form name="listForm" id="leaseassociatedForm" action="${contextPath}/biz/contract/leaseassociated/list?navId=${navId}" modelAttribute="leaseAssociated" method="post" class="form-inline" role="form">
		<ol class="breadcrumb map_1">
			<li><a href="${contextPath}/index">首页</a></li>
			<li><a href="${contextPath}/biz/intent/intAssociated/list?navId=${navId}">招商合约</a></li>
			<li class="active">租赁合同列表</li>
		</ol>
		<input type="hidden" id="contractType" value="leaseassociated">
		<input type="hidden" id="isListJsp" value="true">
   		<div class="o-l-search-builder f_1">
	         <div id="statement-search-builder" class="collapse" style="height:auto;">
	            <div class="f_2">
	                 <div class="form-group col-sm-6">
	                <label for="signBy" class="col-sm-3 control-label f_4">签订人：</label>
	                <div class="col-sm-9 f_6">
	                    <div class="input-group">
	             		 	<input type="hidden" id="signById" maxlength="200" readonly="true" class="f_5 required" />
	             		 	<input type="text" class="f_5" id="signBy" name="signBy" readonly="readonly"  placeholder="合同签订人" value="${associatedContract.signBy}">
	             		 	<span class="input-group-addon f_time"><a onclick="cleanSignBy()"  href="javascript:void"><i class="glyphicon glyphicon-remove"></i></a></span>
	                      	<span class="input-group-btn">
													<button class="btn btn-default btn_3" id="userDialogMultiple1"
														data-dialog="dialog" data-multiple="true"
														data-idField="signById" data-nameField="signBy"
														data-authType="USER" type="button">选择</button>
												</span>
	                     </div>
	                     </div>
	                  </div>
	                 <div class="form-group col-sm-6">
	                      <label for="contractStatus" class="col-sm-3 control-label f_7">合同状态：</label>
							
	                      <div class="col-sm-9 f_6">
	                          <ossp:select dictType="CONTRACT_STATE" class_="f_5" id="contractStatus" defaultSelected="${associatedContract.contractStatus }" name="contractStatus"></ossp:select>
	                      </div>
	                  </div>
	             </div>
	             <div class="f_3">
	                  <div class="form-group col-sm-6">
	                      <label for="inputtext3" class="col-sm-3 control-label f_4">区域：</label>
	                       <div class="col-sm-9 f_6">
	                       	<div class="input-group">
	                       		<input type="hidden" id="areaId"  name="areaId" value="${associatedContract.areaId}"/> 
								<input type="text" class="f_5" id="area" readonly="readonly" name="area" value="${associatedContract.area}">
								<span class="input-group-addon f_time"><a onclick="cleanArea()" href="javascript:void"><i class="glyphicon glyphicon-remove"></i></a></span>
								<span class="input-group-btn">
									<button class="btn btn-default btn_3" id="areaBtn"
									 type="button">选择</button>
									</span>
							</div>
						 </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="contractAttribute" class="col-sm-3 control-label f_7">合同属性：</label>
	                      <div class="col-sm-9 f_6">
	                         <ossp:select dictType="CONTRATC_ATTRIBUTE" class_="f_5" id="contractAttribute" name="contractAttribute" defaultSelected="${associatedContract.contractAttribute}"></ossp:select>
	                      </div>
	                  </div>
	             </div>
	             <div class="f_3">
	                 <div class="form-group col-sm-6">
	                      <label for="store" class="col-sm-3 control-label f_4">门店名：</label>
	                      <div class="col-sm-9 f_6">
	                        <select type="text" class="f_5" id="storeId" name="storeId">
	                        	<option value="" >---请选择---</option>
	                        	<c:if test="${not empty associatedContract.storeId}">
	                        		<option value="${associatedContract.storeId}" selected="selected" >${associatedContract.store}</option>
	                        	</c:if>
	                        </select>
	                        <input type="hidden"  id="store" name="store" value="${associatedContract.store}"/>
	                      </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="floorId" class="col-sm-3 control-label f_7">楼层：</label>
	                      <div class="col-sm-9 f_6">
	                        <select type="email" class="f_5" id="floorId" name="floorId">
	                        	<option value="">---请选择---</option>
	                        	<c:if test="${not empty associatedContract.floorId}">
	                        		<option value="${associatedContract.floorId}" selected="selected">${associatedContract.floor}</option>
	                        	</c:if>
	                        </select>
	                        <input type="hidden" path="floor" id="floor" name="floor"/>
	                      </div>
	                  </div>
	             </div>
	             
	             <div class="f_2">
	                 <div class="form-group col-sm-6">
	                      <label for="inputEmail3" class="col-sm-3 control-label f_4">开始时间：</label>
	                      <div class="col-sm-9 f_6">
	                        <div class="input-group date o-a-form-datetime" data-date="" data-date-format="yyyy-mm-dd">
	                            <input class="form-control f_13" type="text" readonly id="startDate" name="startDate"/>
	                            <span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                            <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
	                        </div>
	                      </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="inputEmail3" class="col-sm-3 control-label f_7">结束时间：</label>
	                      <div class="col-sm-9 f_6">
	                        <div class="input-group date o-a-form-datetime" data-date="" data-date-format="yyyy-mm-dd">
	                            <input class="form-control f_13" type="text" readonly id="endDate" name="endDate"/>
	                            <span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                            <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
	                        </div>
	                      </div>
	                  </div>
	             </div>
	             <div class="f_2">
	             	<div class="form-group col-sm-6">
	             		<label for="createBy" class="col-sm-3 control-label f_4">创建人：</label>
	             		<div class="col-sm-9 f_6">
	             		<div class="input-group">
	             		 <input type="hidden" id="createById" name="createBy" value="${associatedContract.createBy}" maxlength="200" readonly="true" class="f_5 required" />
	                      <input type="text" class="f_5" id="createBy" readonly="readonly" placeholder="合同创建人">
	                      <span class="input-group-addon f_time"><a onclick="cleanCreateBy()" href="javascript:void"><i class="glyphicon glyphicon-remove"></i></a></span>
	                      <span class="input-group-btn">
							<button class="btn btn-default btn_3" id="userDialogMultiple"
									data-dialog="dialog" data-multiple="true"
									data-idField="createById" data-nameField="createBy"
									data-authType="USER" type="button">选择</button>
							</span>
	                     </div>
	                     </div>
	               </div>
	               
	               <div class="form-group col-sm-6">
	                      <label for="store" class="col-sm-3 control-label f_4">历史合同号：</label>
	                      <div class="col-sm-9 f_6">
	                        <input type="text" class="f_5" id=historyContractNo name="historyContractNo" value="${associatedContract.historyContractNo}"/>
	                      </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                  </div>
	            </div> 
	                     <div class="f_3">
	                   <div class="form-group col-sm-6">
	                      <label for="historyContractNo" class="col-sm-4 control-label f_7">交互结果：</label>
	                      <div class="col-sm-8 f_6">
	                      	 <ossp:select dictType="SAP_OPERATE_STATE" class_="f_5" id="operateState" defaultSelected="${associatedContract.operateState }" name="operateState"></ossp:select>
	                         
	                      </div>
	                  </div>
	                      <div class="form-group col-sm-6">
	                      <label for="historyContractNo" class="col-sm-4 control-label f_7">供应商名称：</label>
	                      <div class="col-sm-8 f_6">
	                      <input type="text" name="supplierName" value="${associatedContract.supplierName}" id="supplierName" class="f_5" placeholder="供应商名称"/>
	                      </div>
	                  </div>
	             </div>
	               <div class="f_2">
	                 <div class="form-group col-sm-6">
	                      <label for="historyContractNo" class="col-sm-4 control-label f_7">供应商编号：</label>
	                      <div class="col-sm-8 f_6">
	                      <input type="text" name="supplierNo" value="${associatedContract.supplierNo}"  id="supplierNo" class="f_5" placeholder="供应商编号"/>
	                      </div>
	                  </div>
	               
	               
	               </div>
	         </div>
	         <div class="f_8">
	              <div class="f_2">
	                  <div class="col-sm-4 f_6">
	                       <input id="contractNo" type="text" name="contractNo"  class="f_5" value="${associatedContract.contractNo}" placeholder="合同号"/>
	                  </div>
	                  <div class="col-sm-4 f_6">
	                       <input id="brandCName" type="text" name="assbrandsList[0].brandCName" placeholder="品牌中文名" class="f_5" value="${brandCName}"/>
	                  </div>
	                  <button type="button" id="queryBtn" class="btn btn-warning btn_1">查&nbsp&nbsp;询</button>
	                   <button type="button" onclick="cleanAll()" class="btn btn-warning btn_1">重&nbsp&nbsp;置</button>
	             </div>
	         </div>
	         <div class="o-l-chevron-down"><a href="#" class="btn btn-default collapsed" data-toggle="collapse" data-target="#statement-search-builder" id="chevronDownBtn" role="button"><span id="glyphiconspan" class="glyphicon glyphicon-chevron-down"></span></a>
	         </div>
	     </div>

		<div class="o-l-search-builder f_1">
		<shiro:hasPermission name="com.maoye.ossp.biz.contract.manage.LeaseAssociated:delete">
			<button class="btn btn-danger btn_3 btn_right" type="button" onclick="Oosp_DelChked('${contextPath}/biz/contract/leaseassociated/ids/removeBatch?navId=${navId}','table1','ids')">删除</button>
		</shiro:hasPermission>
		<shiro:hasPermission name="com.maoye.ossp.biz.contract.manage.LeaseAssociated:add">
			<button class="btn btn-info btn_3 btn_right" type="button"   onclick="funform('${contextPath}/biz/contract/leaseassociated/add?navId=${navId}','_self')">新建</button>
		</shiro:hasPermission>
		   <shiro:hasPermission name="com.maoye.ossp.biz.contract.manage.AssociatedContract:submitSap">
		    <button class="btn btn-danger btn_3 btn_right" type="button" onclick="Oosp_SubmitSap('${contextPath}/biz/contract/leaseassociated/ids/submitSap?navId=${navId}&pageNo='+${page.pageNo},'table1','ids')">提交SAP</button>
		  </shiro:hasPermission>
		    
		</div>
  
		<tags:message content="${message}"/>
		<div class="o-l-search-builder f_9">
		<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
			<thead class="t_1">
				<tr>
					<th style="width: 1px"><input type="checkbox" data-ckb="all"></th>
						<th>合同号</th>
						<th>合同名称</th>
						<th>合同状态</th>
						<th>合同属性</th>
						
						<!-- <th>供应商号</th> -->
						<th>供应商名称</th>
						<th>区域</th> 
						<th>所属门店</th>
						<th>变更</th>
						<th>交互相结果</th>
						
				</tr>
			</thead>
			<tbody>
			<c:forEach items="${page.list}" var="leaseassociated">
								<tr data-herf="${contextPath}/biz/contract/leaseassociated/${leaseassociated.id}/view?navId=${navId}&pageNo=${page.pageNo}" data-target="_self">
									<td class="o-l-tab-ckb" >
										<input type="checkbox" data-ckb-id="${leaseassociated.id}" data-ckb-no="${associatedContract.contractNo}" data-ckb-name="${associatedContract.subject}">
									</td>
									<td title="${leaseassociated.contractNo}">${leaseassociated.contractNo}</td>
									<td title="${leaseassociated.subject}">
										<div STYLE="width: 70px; overflow: hidden; text-overflow: ellipsis">
											<nobr>${leaseassociated.subject}</nobr>
										</div>
									</td>
									<td title='<ossp:value dictType="CONTRACT_STATE" key="${leaseassociated.contractStatus}"></ossp:value>'><ossp:value dictType="CONTRACT_STATE" key="${leaseassociated.contractStatus}"></ossp:value></td>
									<td title='<ossp:value dictType="CONTRATC_ATTRIBUTE" key="${leaseassociated.contractAttribute}"></ossp:value>'><ossp:value dictType="CONTRATC_ATTRIBUTE" key="${leaseassociated.contractAttribute}"></ossp:value></td>
									
									<td title="${leaseassociated.supplierName}">
										<div STYLE="width: 70px; overflow: hidden; text-overflow: ellipsis">
											<nobr>${leaseassociated.supplierName}</nobr>
										</div>
									</td>
									<td title="${leaseassociated.area}">${leaseassociated.area}</td> 
									<td title="${leaseassociated.store}">
										<div STYLE="width: 70px; overflow: hidden; text-overflow: ellipsis">
											<nobr>${leaseassociated.store}</nobr>
										</div>
									</td> 
									<td title='<ossp:value dictType="YESORNO" key="${leaseassociated.isModifyContract}"></ossp:value>'><c:if test="${not empty leaseassociated.isModifyContract}"><ossp:value dictType="YESORNO" key="${leaseassociated.isModifyContract}"></ossp:value></c:if></td>
									<td title='<ossp:value dictType="SAP_OPERATE_STATE" key="${leaseassociated.operateState}"></ossp:value>'><ossp:value dictType="SAP_OPERATE_STATE" key="${leaseassociated.operateState}"></ossp:value></td> 
								</tr>
				</c:forEach>
			</tbody>
		</table>
		</div>
<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}" url="" total="${page.total}"/>
    </form:form>	
<script type="text/javascript">
	$('.o-a-form-datetime').datetimepicker({
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0,
		format: 'yyyy-mm-dd'
    });

</script>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div> 	
<script type="text/javascript" src="${staticPath}/js/list.js"></script>

</body>

</html>